package c.e.a.b.g;

import java.util.concurrent.Executor;

public final class o implements Runnable {
    public final /* synthetic */ g a;
    public final /* synthetic */ n b;

    public o(n nVar, g gVar) {
        this.b = nVar;
        this.a = gVar;
    }

    public final void run() {
        try {
            g gVar = (g) this.b.b.a(this.a);
            if (gVar == null) {
                n nVar = this.b;
                nVar.c.m(new NullPointerException("Continuation returned null"));
                return;
            }
            Executor executor = i.b;
            gVar.c(executor, this.b);
            gVar.b(executor, this.b);
            gVar.a(executor, this.b);
        } catch (e e) {
            if (e.getCause() instanceof Exception) {
                this.b.c.m((Exception) e.getCause());
            } else {
                this.b.c.m(e);
            }
        } catch (Exception e2) {
            this.b.c.m(e2);
        }
    }
}
